﻿<%if not in_sdcms then response.write("template load fail"):response.end() end if%>
<!DOCTYPE html>
<!--[if IE 8]>			<html class="ie ie8"> <![endif]-->
<!--[if IE 9]>			<html class="ie ie9"> <![endif]-->
<!--[if gt IE 9]><!-->
<html>
<!--<![endif]-->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="Keywords" content="{sdcms[seokey]}" />
<meta name="Description" content="{sdcms[seodesc]}" />
<title>{sdcms[webname]}{sdcms[seotitle]}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script>var webroot="{webroot}";</script>
<script src="{webroot}theme/default/style/js/jquery-1.11.0.js" type="text/javascript"></script>
<link rel="stylesheet" href="{webroot}theme/default/style/css/font-awesome.css" type="text/css" />
<link rel="stylesheet" href="{webroot}theme/default/style/css/owl.carousel.css" media="screen" />
<link rel="stylesheet" href="{webroot}theme/default/style/css/owl.theme.css" media="screen" />
<link rel="stylesheet" href="{webroot}theme/default/style/css/bootstrap.3.2.0.css" type="text/css" />
<link rel="stylesheet" href="{webroot}theme/default/style/css/bootstrap-select.css" />
<link rel="stylesheet" href="{webroot}theme/default/style/css/theme.css" />
<link rel="stylesheet" href="{webroot}theme/default/style/css/theme-elements.css" type="text/css" />
<link rel="stylesheet" href="{webroot}theme/default/style/css/theme-animate.css" />
<link rel="stylesheet" href="{webroot}theme/default/style/css/theme-shop.css" />
<link rel="stylesheet" href="{webroot}theme/default/style/css/settings.css" media="screen" />
<link rel="stylesheet" href="{webroot}theme/default/style/css/component.css" media="screen" />
<link rel="stylesheet" href="{webroot}theme/default/style/css/bim.css" type="text/css" />
<link rel="stylesheet" href="{webroot}theme/default/style/css/custom.css" />
<link rel="stylesheet" href="{webroot}theme/default/style/css/theme-responsive.css" />
<link rel="stylesheet" href="{webroot}theme/default/style/css/datepicker3.css" />
<!--[if IE]>
        <link rel="stylesheet" href="{webroot}theme/default/style/css/ie.css">
    <![endif]-->
<!--[if lte IE 8]>
        <script src="{webroot}theme/default/style/js/respond.js"></script>
    <![endif]-->
<script src="{webroot}lib/js/jquery.js"></script>
<script src="{webroot}lib/js/jquery-migrate-1.1.0.min.js"></script>
<script src="{webroot}lib/tips/jquery.tips.js"></script>
<script src="{webroot}lib/js/base.js"></script>
<script src="{webroot}lib/validator/jquery.validator.js"></script>
<script src="{webroot}lib/validator/zh_CN.js"></script>
<script src="{webroot}theme/default/js/sdcms.js"></script>
{if sdcms[isreg]}
<script>
$(function(){
	
	$(".form_reg").validator(
	{
		stopOnError:true,
		theme:'yellow_right_effect',
		ignore:':hidden',
		valid:function(form)
		{   
		    if($("#useragreement").attr("checked")!="checked"){
		    $.fn.tips({type:'warn',content:'请确认同意用户授权协议'});
			return false;
			}
			$.fn.tips({type:'loading',content:'数据提交中'});
			$.ajax(
			{
				url:"?act=db",
				type:"post",
				data:$(form).serialize(),
				success:function(data){
					data=jQuery.parseJSON(data);
					var type="warn";
					if(data.status=="y"){type="ok";}
					$.fn.tips({type:type,content:data.info});
					if(data.status=="y")
					{
						var act=data.info.substring(0,1);
						var info=data.info.substring(1);
						switch(act)
						{
							case "1":
								$.fn.tips({type:"ok",content:info,time:10000});
								break;
							case "2":
								$.fn.tips({type:"ok",content:info,time:5000});
								break;
							case "3":
								$.fn.tips({type:"ok",content:info,time:2000});
								var gourl=$("#gourl").attr("value");
								if(gourl==""){gourl="./"}
								if(gourl.indexOf("login.asp")!=-1||gourl.indexOf("reg.asp")!=-1){gourl="./"}
								$.fn.tips({type:"ok",content:info});
								setTimeout(function(){location.href=gourl},2500);
								break;
							default:
								alert(_);
								break;
						}
					}

				}
			});
		}
	});
})
</script>
{/if}
</head>

<body>
<div class="body">
   {sdcms:include("../sdcms_head.asp")}
 <div class="space50 hidden-xs"></div>
<div class="container">
    <div class="">
        <div class="col-xs-12 col-sm-6 col-sm-offset-3 col-lg-4 col-lg-offset-4">

            <div class="row featured-boxes login">
                <div class="col-xs-12">
                    <div class="featured-box featured-box-secundary default info-content">
                        <div class="box-content">

                            <!-- REGISTER FORM -->
                            <div class="" id="register">
                                <h1 class="signin-header">创建您的BIMobject帐户</h1>

                                <div class="alert alert-danger text-center small hidden" id="form-signup-global-errors">
                                    <ul class="list-inline"></ul>
                                </div>
                   {if sdcms[isreg]}
                   <form class="form_reg" method="post">
                                    <div class="row">
                                        <div class="col-xs-12">
                                            <input type="text" value="" id="username" class="form-control" name="username" placeholder="请输入电子邮箱或手机号码注册"> <input type="hidden" value="0" name="utype" id="utype">
                                            <div class="space10"></div>
                                            <div id="getsms" style="display:none">
                                   
                                   <input id="zphone" type="button" value=" 获取手机验证码 " onClick="get_mobile_code();">
                                                                        <div class="space10"></div>

                                  <input type="text" size="8" placeholder="输入手机验证码" name="mobile_code" class="form-control" />
                                      <div class="space10"></div>

                                            </div>
                                            
                                            <input type="password" value="" class="form-control" name="password" placeholder="密码">
                                            <div class="space10"></div>
                                            <input type="password" value="" class="form-control" name="repass" placeholder="确认密码">
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-xs-12">
                                            <span class="checkbox">
                                                <label for="useragreement">
                                                    <input type="checkbox" id="useragreement" value="true" checked/>
                                                    <small><a class="pull-right bim" href="{webroot}user/agreement.asp">我同意此用户授权协议</a></small>
                                                </label>
                                            </span>
                                        </div>
                                        <div class="space10"></div>
                                        <div class="col-xs-12">
                                        <input type="hidden" name="gourl" id="gourl" value="{gourl}" />
                                            <input type="submit" value="创建您的BIMobject帐户" class="btn btn-primary pull-right push-bottom nomargin" data-loading-text="">
                                        </div>
                                    </div>
                    </form>
                   {else}
                   {sdcms[userclose]}
                   {/if}
                            </div>
                        </div>

                        <div class="space1"></div>
                        <div class="col-xs-12">
                                <div class="col-xs-12">
                                    <section id="socialLoginForm">
                                        <hr />
<div id="socialLoginList">
                <p>
           {sdcms:rs field="setkey,setvalue" table="sd_config" where="setname='sdcms.api.login'"}
                   {dim api_arr:api_arr=split($rs[setkey],".")}
                   {dim api_key:api_key=api_arr(0)}
                   {dim setvalue:setvalue=eval($rs[setvalue])}
                   {if setvalue(0)<>""}
    <div onclick="location.href='{webroot}api/login/{api_key}/api.asp'" class="btn btn-default btn-block btn-sm{if i mod 2=0} google{else} linkedin{/if}" title="使用{api_key}帐户登录"><i class="icon social-icon"><img src="{webroot}api/login/{api_key}/images/login.png" border="0" /></i>使用{api_key}帐户登录</div>
                  {/if}
                  {/sdcms:rs} 
                </p>
            </div>

                                    </section>
                                </div>
                            <div class="col-xs-12 text-center">
                                <a class="small" id="show-login-link" href="/user/login.asp">登录</a>
                            </div>
                            <div class="col-xs-12 visible-xs">
                                <div class=" space10"></div>
                                <img src="{webroot}theme/default/style/images/Powered_by_BIMobject.png" alt="Powered by {sdcms[webname]}" class="img-responsive pull-right" style="width: 100px;"/>
                            </div>
                        </div>
                        <div class="space20"></div>
                    </div>
                    <div class="space1"></div>
                </div>
            </div>

            

       
        </div>
    </div>
</div>
  
  
  
   {sdcms:include("../sdcms_foot.asp")}
</div>




<script>


	function get_mobile_code(){
			var fvalue=$("#username").val()
			$.ajax(
			{
				url:"ajax.asp?act=sendsms&fvalue="+fvalue,
				type:"get",
				data:"",
				success:function(data){
					data=jQuery.parseJSON(data);
					var type="warn";
					if(data.status=="y")
					{
						type="ok";
							$.fn.tips({type:type,content:data.info});
							RemainTime();
					}
					else{
					$.fn.tips({type:type,content:data.info});
					}

				}
			});
			
	};
	var iTime = 59;
	var Account;
	function RemainTime(){
		document.getElementById('zphone').disabled = true;
		var iSecond,sSecond="",sTime="";
		if (iTime >= 0){
			iSecond = parseInt(iTime%60);
			iMinute = parseInt(iTime/60)
			if (iSecond >= 0){
				if(iMinute>0){
					sSecond = iMinute + "分" + iSecond + "秒";
				}else{
					sSecond = iSecond + "秒";
				}
			}
			sTime=sSecond;
			if(iTime==0){
				clearTimeout(Account);
				sTime='获取手机验证码';
				iTime = 59;
				document.getElementById('zphone').disabled = false;
			}else{
				Account = setTimeout("RemainTime()",1000);
				iTime=iTime-1;
			}
		}else{
			sTime='没有倒计时';
		}
		document.getElementById('zphone').value = sTime;
	}	
	
$("#username").blur(function(){
	var fvalue=$(this).val()

	$.ajax(
			{
				url:"ajax.asp?act=ureg&fvalue="+fvalue,
				type:"get",
				data:"",
				success:function(data){
					data=jQuery.parseJSON(data);
					var type="warn";
					if(data.status=="y")
					{
						type="ok";
						var act=data.info.substring(0,1);
						var info=data.info.substring(1);
						switch(act)
						{
							case "1":
							$("#utype").val(1)
								break;
							case "2":
							$("#getsms").show()
							$("#utype").val(2)
								break;
							default:
								break;
						}
					}
					else{
					$.fn.tips({type:type,content:data.info});
					}

				}
			});
})

</script>

<script src="{webroot}theme/default/style/js/jqueryappear.js"></script> 

<!-- Libs --> 
<script src="{webroot}theme/default/style/js/plugins.js"></script> 
<script src="{webroot}theme/default/style/js/jquery.easing.js"></script> 
<script src="{webroot}theme/default/style/js/jquery.cookie.js"></script> 
<script src="{webroot}theme/default/style/js/bootstrap.min.3.2.0.js"></script> 
<script type="text/javascript" src="{webroot}theme/default/style/js/bootstrap-datepicker.js"></script> 
<script type="text/javascript" src="{webroot}theme/default/style/js/bootstrap-datepicker.defaults.js"></script> 
<script src="{webroot}theme/default/style/js/jquery.themepunch.tools.min.js"></script> 
<script src="{webroot}theme/default/style/js/jquery.themepunch.revolution.js"></script> 
<script src="{webroot}theme/default/style/js/owl.carousel.js"></script> 
<script src="{webroot}theme/default/style/js/jquery.flipshow.js"></script> 
<script src="{webroot}theme/default/style/js/jquery.stellar.js"></script> 
<script src="{webroot}theme/default/style/js/jquery.validate.js"></script> 
<script src="{webroot}theme/default/style/js/jquery.isotope.js"></script> 
<script src="{webroot}theme/default/style/js/view.home.js"></script> 
<script src="{webroot}theme/default/style/js/theme.js"></script> 
<script type="text/javascript" src="{webroot}theme/default/style/js/site.dialogues.js"></script>
</body>
</html>